Which means we can't check if a parser limit was exceeded while trying
to expand the content of a tag, but that's probably not a huge loss.
It'll just result in potentially strange output rather than an exception.
Bug: T149622
Change-Id: I7910dfa0f61b1cc9168c7ed1498b2bda27c47f0e
return $attrText;
}
+ // We can't safely check if the expansion for $content resulted in an
+ // error, because the content could happen to be the error string
+ // (T149622).
$content = !isset( $params['inner'] ) ? null : $frame->expand( $params['inner'] );
- if ( substr( $content, 0, $errorLen ) === $errorStr ) {
- // See above
- return $content;
- }
$marker = self::MARKER_PREFIX . "-$name-"
. sprintf( '%08X', $this->mMarkerIndex++ ) . self::MARKER_SUFFIX;
</span></p>
!! end
+!! test
+Don't parse <nowiki><span class="error"></nowiki> (T149622)
+!! wikitext
+<nowiki><span class="error"></nowiki>
+!! html/php
+<p><span class="error">
+</p>
+!! end
+
!! test
nowiki 3
!! wikitext